package com.yonyou.cms.epc.client.dto.graphic;


import com.yonyou.cms.epc.client.dto.BaseDTO;
import com.yonyou.cyx.framework.bean.entity.base.BasePO;
import com.yonyou.cyx.function.utils.bean.BeanMapperUtil;

import java.io.Serializable;


/**
 * <p>
 * 
 * </p>
 *
 * @author yzy
 * @since 2022-06-08
 */

public class GraphicModelDTO extends BaseDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 图解车型id
     */
    private Integer modelId;
    /**
     * 车型代码
     */
    private String modelCode;
    /**
     * 车型名称
     */
    private String modelName;

    public GraphicModelDTO() {
        super();
    }

    public Integer getModelId() {
        return modelId;
    }

    public void setModelId(Integer modelId) {
        this.modelId = modelId;
    }

    public String getModelCode() {
        return modelCode;
    }

    public void setModelCode(String modelCode) {
        this.modelCode = modelCode;
    }

    public String getModelName() {
        return modelName;
    }

    public void setModelName(String modelName) {
        this.modelName = modelName;
    }

    @Override
    public String toString() {
        return "GraphicModelDTO{" +
        "modelId=" + modelId +
        ", modelCode=" + modelCode +
        ", modelName=" + modelName +
        "}";
    }

    /**
     * 将DTO 转换为PO
     * //对某个对象属性进行赋值
     * //BeanMapperUtil.populateValueByMethod(transPO,"setXxx",this.getXxx);
     * @param poClass dto 需要转换的dto
     * @author yzy
     * @since 2018/7/22 0022
     */
    @Override
    public <T extends BasePO> T transDtoToPo(Class<T> poClass) {
        return super.transDtoToPo(poClass);
    }

    /**
     * 将DTO 转换为PO
     * BeanMapperUtil.populateValueByMethod(transPO,"setXxx",this.getXxx);
     * @param po 需要转换的对象
     * @author yzy
     * @since 2018/7/22 0022
     */
    public <T extends BasePO> void transDtoToPo(T po) {
        BeanMapperUtil.copyProperties(this, po, "modelId");
    }

}
